(function () {
  
  let renew=(obj)=>axios.patch('/my/updatepwd',obj);

  let originpassword=document.querySelector('.originpassword');
  let newpassword=document.querySelector('.newpassword');
  let confirmpassword=document.querySelector('.confirmpassword');
  let change=document.querySelector('.change');
  let remake=document.querySelector('.remake');
  

// 修改密码

change.addEventListener('click',async function () {
  console.log(String(originpassword.value));
       let obj={
        "old_pwd":String(originpassword.value),
        "new_pwd":String(newpassword.value),
        "re_pwd":String(confirmpassword.value)
       };
      let res=await renew(obj);
      console.log(res);
})

// 重置密码
remake.addEventListener('click',function () {
  originpassword.value='';
  newpassword.value=''; 
  confirmpassword.value='';
})




















})()